import { DEFAULT_LAYOUT, PAGE_LAYOUT } from '../base';
import { AppRouteRecordRaw } from '../types';

const PLAT_BIZ_OPS: AppRouteRecordRaw = {
  path: '/plat-biz-ops',
  name: 'PlatBizOps',
  component: DEFAULT_LAYOUT,
  meta: {
    locale: '运营中心',
    requiresAuth: true,
    icon: 'icon-dashboard',
    order: 0,
  },
  children: [
    {
      path: '/plat-biz-ops-scope',
      name: 'PlatBizOpsScope',
      component: PAGE_LAYOUT,
      meta: {
        locale: '商家管理',
        requiresAuth: true,
        icon: 'icon-dashboard',
        order: 0,
      },
      children: [
        {
          path: '/plat-biz-ops-scope-decoration',
          name: 'PlatBizOpsScopeDecoration',
          component: () =>
            import('@/views/plat/biz-ops/scope/decoration/index.vue'),
          meta: {
            locale: '装企',
            requiresAuth: true,
            roles: ['*'],
          },
        },
        {
          path: '/plat-biz-ops-scope-agency',
          name: 'PlatBizOpsScopeAgency',
          component: () =>
            import('@/views/plat/biz-ops/scope/agency/index.vue'),
          meta: {
            locale: '供应商',
            requiresAuth: true,
            roles: ['*'],
          },
        },
        {
          path: '/plat-biz-ops-scope-worker',
          name: 'PlatBizOpsScopeWorker',
          component: () =>
            import('@/views/plat/biz-ops/scope/worker/index.vue'),
          meta: {
            locale: '工人',
            requiresAuth: true,
            roles: ['*'],
          },
        },
      ],
    },
    {
      path: '/plat-biz-ops-meta',
      name: 'PlatBizOpsMeta',
      component: PAGE_LAYOUT,
      meta: {
        locale: '资源管理',
        requiresAuth: true,
        icon: 'icon-dashboard',
        order: 0,
      },
      children: [
        {
          path: '/plat-biz-ops-meta-file',
          name: 'PlatBizOpsMetaFile',
          component: () => import('@/views/plat/biz-ops/meta/file/index.vue'),
          meta: {
            locale: '文件管理',
            requiresAuth: true,
            roles: ['*'],
          },
        },
        {
          path: '/plat-biz-ops-meta-unit',
          name: 'PlatBizOpsMetaUnit',
          component: () => import('@/views/plat/biz-ops/meta/unit/index.vue'),
          meta: {
            locale: '单位管理',
            requiresAuth: true,
            roles: ['*'],
          },
        },
        {
          path: '/plat-biz-ops-meta-category',
          name: 'PlatBizOpsMetaCategory',
          component: () =>
            import('@/views/plat/biz-ops/meta/category/index.vue'),
          meta: {
            locale: '类目管理',
            requiresAuth: true,
            roles: ['*'],
          },
        },
        {
          path: '/plat-biz-ops-meta-brand',
          name: 'PlatBizOpsMetaBrand',
          component: () => import('@/views/plat/biz-ops/meta/brand/index.vue'),
          meta: {
            locale: '品牌管理',
            requiresAuth: true,
            roles: ['*'],
          },
        },
      ],
    },
    {
      path: '/plat-biz-ops-conf',
      name: 'PlatBizOpsConf',
      component: PAGE_LAYOUT,
      meta: {
        locale: '配置管理',
        requiresAuth: true,
        icon: 'icon-dashboard',
        order: 0,
      },
      children: [
        {
          path: '/plat-biz-ops-conf-contract',
          name: 'PlatBizOpsConfContract',
          component: () =>
            import('@/views/plat/biz-ops/conf/contract/index.vue'),
          meta: {
            locale: '合同配置',
            requiresAuth: true,
            roles: ['*'],
          },
        },
      ],
    },
  ],
};

export default PLAT_BIZ_OPS;
